Let $f(x, y) = \cos(2y) - xy - y^2$. What is the Hessian of $f$ ? Choose 1 answer: Choose 1 answer: (Choice A) A $\begin{bmatrix} 0 & -1 \\ \\ -1 & -4\cos(2y) - 2 \end{bmatrix}$ (Choice B) B $\begin{bmatrix} -y & -2\sin(2y) - x - 2y \\ \\ 0 & -4\cos(2y) - 2 \end{bmatrix}$ (Choice C) C $\begin{bmatrix} -4\cos(2y) - 2 & -1 \\ \\ -1 & 0 \end{bmatrix}$ (Choice D) D $\begin{bmatrix} -1 & -4\cos(2y) - 2 \\ \\ 0 & -1 \end{bmatrix}$
Explanation: The Hessian of a scalar field $f$ is the matrix that contains all its second-order partial derivative information. $\bold{H}(f) = \begin{bmatrix} f_{xx} & f_{xy} \\ \\ f_{yx} & f_{yy} \end{bmatrix}$ Because the order of mixed partial derivatives often doesn't matter, the bottom left and top right entries of the Hessian are usually the same. Let's calculate the second order partial derivatives of $f$ ! $\begin{aligned} f_{xx} &= \dfrac{\partial}{\partial x} \left[ -y \right] = 0 \\ \\ f_{yx} &= \dfrac{\partial}{\partial y} \left[ -y \right] = -1 \\ \\ f_{xy} &= \dfrac{\partial}{\partial x} \left[ -2\sin(2y)-x-2y \right] \\ \\ &= -1 \\ \\ f_{yy} &= \dfrac{\partial}{\partial y} \left[ -2\sin(2y)-x-2y \right] \\ \\ &= -4\cos(2y) - 2 \end{aligned}$ Now we can put all the second-order partial derivatives together into the Hessian. $\bold{H}(f) = \begin{bmatrix} 0 & -1 \\ \\ -1 & -4\cos(2y) - 2 \end{bmatrix}$